/**
 * @file e2_t2_q3.c
 * @date 2022-03-02
 * 
 * @copyright Copyright (c) 2022 cnzyx MIT Licence
 * 
 */

#include<stdio.h>
#include<stdlib.h>

long fun(long num){
    long temp=0,result=0;
    for(int i=1;num/10>0;i++,num/=10){
        if(i%2==0){
            temp*=10;
            temp+=num%10;
        }
    }
    for(;temp>0;temp/=10){
        result*=10;
        result+=temp%10;
    }
    return result;
}

int main(int argc, char const *argv[])
{
    //UTF-8
    system("chcp 65001");

    long in_num,result;
    printf("请输入一个整数：");
    scanf("%ld,",&in_num);
    result=fun(in_num);
    printf("结果：%ld\n",result);
    
    //Pause console
    system("pause");
    return 0;
}
